<template>
	<view>
		<view class="flex-row flex-ca tabs">
			<view :class="isActive===1?'tabs-active':''" @tap="changeTab(1)">
				预警信息
			</view>
			<view :class="isActive===2?'tabs-active':''" @tap="changeTab(2)">
				线索信息
			</view>
			<view :class="isActive===3?'tabs-active':''" @tap="changeTab(3)">
				警情信息
			</view>
			<view :class="isActive===4?'tabs-active':''" @tap="changeTab(4)">
				案件信息
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isActive: 1
			}
		},
		methods: {
			changeTab(e) {
				this.isActive = e
			}
		}
	}
</script>

<style lang="scss">
	.tabs {
		height: 92upx;
		background-color: white;
		margin-top: 2upx;
		color: #999999;
		font-size: 26upx;

		&-active {
			color: black;
			font-size: 28upx;
			font-weight: bold;
			position: relative;

			&::after {
				content: "";
				display: block;
				position: absolute;
				width: 60upx;
				height: 4upx;
				background-color: black;
				top: 60upx;
				left: 28upx;
			}
		}
	}
</style>
